package yao.spider.jsoup.xiangrikui;

import java.io.IOException;

import yao.common.excel.ExcelCreator;

public class SpiderClient {
	
	
	
	public static void main(String[] args) throws IOException {
		test1();
	}
	
	/**
	 * 可以启动多个线程
	 */
	public static void test1() {
		Thread t1 = new Thread(new Runnable() {			
			@Override
			public void run() {
				XiangRiKuiSpider spider = XiangRiKuiSpider.createOfRange("E:\\error_1_10.txt", ExcelCreator.createExcel2007("E:\\", "xrk_1_10"), 1, 10);
				try {
					spider.exportExcel();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		});
		t1.start();
	}
	
	public static void test2() throws IOException {
		XiangRiKuiSpider spider = XiangRiKuiSpider.createOfReplenish("E:\\error_rep1.txt", 
				ExcelCreator.createExcel2007("E:\\", "xrk_rep1"), "E:\\", "error_*.txt");
		spider.exportExcel();
	}
	
	
	
}
